package org.crazyit.activiti_d1._3_AddGroup;

import org.activiti.engine.IdentityService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.identity.Group;

public class AddGroupError {

    public static void main(String[] args) {

        //1. 创建默认的流程引擎
        ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();

        //2. 得到身份服务组件实例
        IdentityService identityService = engine.getIdentityService();

        //3. 查询用户组
        Group data = identityService.createGroupQuery().groupId("a6f6267a-1fa8-493d-95d8-15811cdb84c1").singleResult();

        //7. 修改用户组信息
        data.setId("1");

        //8. 保存用户组信息
        identityService.saveGroup(data);

    }

}
